import 'package:steam_app/config/app_routes.dart';
import 'package:uuid/uuid.dart';
import '../entity/game.dart';
import '../entity/product.dart';
import '../entity/user.dart';
import '../entity/user_product.dart';

class MockData {
  static final _uuid = const Uuid();


  static final user1 = User(
    id: _uuid.v4(),
    account: 'testuser1',
    name: 'admin',
    password: '123456',
    avatar: testuser1_avatar,
    balance: 30.0
  );

  static final user2 = User(
    id: _uuid.v4(),
    account: 'testuser2',
    name: 'test',
    password: '123456',
    avatar: '',
    balance: 0.0
  );

  static final List<User> users = [user1, user2];


  static final game1 = Game(
    id: _uuid.v4(),
    name: 'Resident Evil 4',
    description: 'test',
    coverImage: game1_cover,
    developer: 'Capcom',
  );

  static final game2 = Game(
    id: _uuid.v4(),
    name: 'DARK SOULS™ Ⅲ',
    description: 'test',
    coverImage: game2_cover,
    developer: 'FromSoftware Inc.',
  );

  static final game3 = Game(
    id: _uuid.v4(),
    name: 'SILENT HILL 2',
    description: 'test',
    coverImage: game3_cover,
    developer: 'KONAMI',
  );

  static final List<Game> games = [game1, game2, game3];


  static final product1_1 = Product(
    id: _uuid.v4(),
    name: 'Resident Evil 4',
    description: '标准版游戏本体',
    type: 'BASE_GAME',
    price: 198.0,
    gameId: game1.id,
  );
  static final product1_2 = Product(
    id: _uuid.v4(),
    name: 'Resident Evil 4 - Separate Ways',
    description: '逆命殊途 DLC',
    type: 'DLC',
    price: 58.0,
    gameId: game1.id,
  );
  static final product2_1 = Product(
    id: _uuid.v4(),
    name: 'DARK SOULS™ Ⅲ',
    description: '标准版游戏本体',
    type: 'BASE_GAME',
    price: 268.0,
    gameId: game2.id,
  );
  static final product3_1 = Product(
    id: _uuid.v4(),
    name: 'SILENT HILL 2',
    description: '豪华版',
    type: 'DELUXE_EDITION',
    price: 448.0,
    gameId: game3.id,
  );

  static final List<Product> products = [product1_1, product1_2, product2_1, product3_1];


  //库存
  static final userProduct1 = UserProduct(
    id: _uuid.v4(),
    userId: user1.id,
    productId: product1_1.id,
    purchaseDate: DateTime.now().subtract(const Duration(days: 50)),
  );
  static final userProduct2 = UserProduct(
    id: _uuid.v4(),
    userId: user1.id,
    productId: product3_1.id,
    purchaseDate: DateTime.now().subtract(const Duration(days: 100)),
  );

  static final List<UserProduct> userProducts = [userProduct1, userProduct2];


  //愿望单
  static final Map<String, dynamic> wishlistItem1 = {
    'userId': user1.id,
    'gameId': game2.id,
  };

  static final List<Map<String, dynamic>> wishlistItems = [wishlistItem1];
}